<?php
/**
 * 
 * ClientEngage: ClientEngage Visitor Voice (http://www.clientengage.com)
 * Copyright 2012, ClientEngage (http://www.clientengage.com)
 *
 * You must have purchased a valid license from CodeCanyon in order to have 
 * the permission to use this file.
 * 
 * You may only use this file according to the respective licensing terms 
 * you agreed to when purchasing this item on CodeCanyon.
 * 
 * 
 * 
 *
 * @author          ClientEngage <contact@clientengage.com>
 * @copyright       Copyright 2013, ClientEngage (http://www.clientengage.com)
 * @link            http://www.clientengage.com ClientEngage
 * @since           ClientEngage - Visitor Voice v 1.0
 * 
 */
?>
<?php
if ($visitorform['Visitorform']['active'] === false)
{
    echo '<!-- ' . __('Visitorform Inactive') . '-->';
    return;
}
?>
<?php if (trim($visitorform['Visitorform']['redirect_url']) != ''): ?>
    <script type="text/javascript">
        $(function(){
            window.parent.location = '<?php echo $visitorform['Visitorform']['redirect_url']; ?>'; // Redirect whole parent window
        });
    </script>
<?php endif; ?>
<script type="text/javascript">
    var isSuccessPage = true;
    var isFormPage = true;
    $(function(){
        $('.btn_close_modal').on('click', function() {
            parent.$.fn.colorbox.close(); // Close window        
        });
    });
<?php echo $visitorform['Formtheme']['js']; ?>     
</script>
<style type="text/css">
<?php echo $visitorform['Formtheme']['css']; ?>  
</style>
<div class="success_message">
    <?php echo $visitorform['Visitorform']['text_success']; ?>
</div>